package PrototypePattern;

/**
 * @version: java version 1.8
 * @Author: Zheng
 * @description:
 * @date: 2022-08-14 10:41
 */
public class PrototypePattemDemo {
    public static void main(String[] args) {
        ShapeCache.loadCache();

        Shape cloneShape = ShapeCache.getShape("1");
        System.out.println("Shape:"+cloneShape.getType());

        Shape cloneShape2 = ShapeCache.getShape("2");
        System.out.println("Shape:"+cloneShape2.getType());

        Shape cloneShape3 = ShapeCache.getShape("3");
        System.out.println("Shape:"+cloneShape3.getType());
    }
}
